home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 1833 / 1833.xpi / chrome / m / yoono.com / sidebar.jar / sidebar / js / multiIframeYoodget.js < prev    next >
Text File  |  2009-12-16  |  2KB  |  1 lines

  1. function MultiIframeYoodget(){this.base=Yoodget;this.base();this.iframeMgrList={};this.iframeContainer=yoono.dom.$("iframeContainer");this.visibleIframeMgr=null}MultiIframeYoodget.prototype=new Yoodget;MultiIframeYoodget.prototype.init=function(){try{var a=this;Yoodget.prototype.init.call(this)}catch(b){logError("MultiIframeYoodget.init: "+b)}};MultiIframeYoodget.prototype.saveList=function(){var b=new Array();for(var a in this.iframeMgrList){b.push(a)}this.setKeyValue("IframeList",YServices.json.encode(b))};MultiIframeYoodget.prototype.removeIframeMgr=function(b){var a=this.iframeMgrList[b].getIframe();if(this.iframeMgrList[b]==this.visibleIframeMgr){this.setTitle(this.name);this.visibleIframeMgr=null}this.iframeMgrList[b].finalize();this.iframeContainer.removeChild(a.parentNode);this.iframeMgrList[b]=null;delete this.iframeMgrList[b];this.saveList()};MultiIframeYoodget.prototype.createOrGetIframeMgr=function(b){if(b in this.iframeMgrList){this.showIframeMgr(b);return(false)}var a=this._createIframeMgr(b,this);if(a){this.iframeMgrList[b]=a;this.showIframeMgr(b);this.saveList()}return(true)};MultiIframeYoodget.prototype._createIframeMgr=function(f,c){var a=null;try{var d=this.classNameFromId(f);a=new window[d]();a.init(this.iframeContainer,c,f)}catch(b){logError("MultiIframeYoodget._createIframeMgr: probably no class available for "+d+" : "+b)}return(a)};MultiIframeYoodget.prototype.showIframeMgr=function(c){var b=null;for(var a in this.iframeMgrList){if(a==c){b=this.iframeMgrList[c]}else{this.iframeMgrList[a].hideIframe()}if(b){b.showIframe()}}this.visibleIframeMgr=b};MultiIframeYoodget.prototype.classNameFromId=function(a){return(a.charAt(0).toUpperCase()+a.substr(1).toLowerCase()+"Manager")};MultiIframeYoodget.prototype.notify=function(a,b){thrown("MultiIframeYoodget.notify must be overloaded")};